package com.guli.common.constants;

import lombok.Getter;

/**
 * @author XiaoHua666
 * @date 2019/4/15
 */
@Getter
public enum ResultCodeEnum {

    /**
     * SUCCESS true-成功或 fa失败
     */
    SUCCESS(true, 20000, "成功"),
    UNKNOWN_REASON(false, 20001, "未知错误"),
    BAD_SQL_GRAMMAR(false, 21001, "sql语法错误"),
    JSON_PARSE_ERROR(false, 21002, "json解析异常"),
    PARAM_ERROR(false, 21003, "参数不正确"),
    FILE_UPLOAD_ERROR(false, 21004, "文件上传错误"),
    EXCEL_DATA_IMPORT_ERROR(false, 21005, "Excel数据导入错误"),
    VIDEO_UPLOAD_TOMCAT_ERROR(false, 21006, "视频上传到服务器失败"),
    VIDEO_UPLOAD_ALIYUN_ERROR(false, 21007, "视频上传到阿里云失败"),
    VIDEO_DELETE_ALIYUN_ERROR(false, 21008, "视频删除失败"),
    FETCH_VIDEO_PLAYAUTH_ERROR(false, 21009, "获取视频播放权限失败"),
    REFRESH_VIDEO_PLAYAUTH_ERROR(false, 21010, "刷新视频播放权限失败"),
    INVALID_CALLBACK_REQUEST_ERROR(false, 21011, "无效的请求回调"),
    FETCH_ACCESSTOKEN_FAILD(false, 21012, "获取AccessToken失败"),
    FETCH_USERINFO_FAILD(false, 21013, "获取用户信息失败");


    private Boolean success;

    private Integer code;

    private String message;

    ResultCodeEnum(Boolean success, Integer code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

}
